/**
 * Created by xiaom on 2016/10/29.
 */
import React, {Component, PropTypes} from 'react';
import AppBar from 'material-ui/AppBar';
import IconButton from 'material-ui/IconButton';
import NavigationChevronLeft from 'material-ui/svg-icons/navigation/chevron-left';


function handleTouchTap() {
  window.history.go(-1);
}

export default class Header extends Component {
  static propTypes = {
    title: PropTypes.object
  };

  render() {
    return (
      <AppBar title={this.props.title} style={{backgroundColor: 'rgb(53,54,59)'}}
              iconElementLeft={<IconButton onTouchEnd={handleTouchTap}><NavigationChevronLeft /></IconButton>}/>
    );
  }
}
